import request from '@/utils/request'
/**
 * 获取部门列表
 * @returns
 */
export const reqGetDepartment = () => {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

/**
 * 删除部门接口
 * @param {*} id
 * @returns
 */
export function reqDelDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

/**
 *
*/

export function reqAddDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 获取每行详情
export const reqGetDepartDetail = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}

export const reqUpdateDepartments = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
